<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<f:view >
	<a4j:form>
		<rich:panel>
        <f:facet name="header">
        	<h:outputText value="Rejestracja nowego nauczyciela"/>
        </f:facet>
        <rich:comboBox selectFirstOnUpdate="true" listWidth="90" value="#{comboDemoBean.backgroundColorItem}"										
					        			defaultLabel="" id="bgColorCombo"
					        			
					        			>
                            <f:attribute name="selectItems" value="#{comboDemoBean.selectItems['Colors']}"/>					        			
					        <f:selectItems value="#{comboDemoBean.selectItems['Colors']}"  />
					        <!--<a4j:support event="onselect" reRender="someTextPanel1,someTextPanel2,someTextPanel3" />-->
					    </rich:comboBox>
    	</rich:panel>
	</a4j:form>
</f:view>
<a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel')}.show()" reRender="panel" />
 <rich:modalPanel id="panel" width="350" height="100" showWhenRendered="#{nauczyciel.wynik}">
        <f:facet name="header">
            <h:outputText value="#{nauczyciel.naglowek}"></h:outputText>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
            	<h:commandButton   id="hidelink"/>
                <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
            </h:panelGroup>
        </f:facet>
        <h:outputText value="#{nauczyciel.tresc}"/>
    </rich:modalPanel>
<rich:dataTable value="1" var="cap" rows="5">
        <f:facet name="caption">
                <h:outputText value="United States Capitals" />
        </f:facet>
        <f:facet name="header">
                <h:outputText value="Capitals and States Table" />
        </f:facet>
        <rich:column>
                <f:facet name="header">State Flag</f:facet>
                1
                <f:facet name="footer">State Flag</f:facet>
        </rich:column>
        <rich:column>
                <f:facet name="header">State Name</f:facet>
                2
                <f:facet name="footer">State Name</f:facet>
        </rich:column>
</rich:dataTable>
</html>